package com.chen.utils;/**
 * @ProjectName: springBootXm
 * @Package: com.chen.bolg.Utils
 * @ClassName: UserThredcal
 * @Author: Chen
 * @Description:
 * @Date: 2022/7/31 22:10
 * @Version: 1.0
 */


import com.chen.entity.User;

/**
 *@ClassNameUserThredcal
 *@Author CWS
 @Date 2022/7/31 22:10
 @Version 1.0
 **/
public class UserThreadLocal {
    private UserThreadLocal(){}

    private static final ThreadLocal<User> LOCAL = new ThreadLocal<>();

    public static void put(User user){
        LOCAL.set(user);
    }
    public static User get(){
        return LOCAL.get();
    }
    public static void remove(){
        LOCAL.remove();
    }
}
